# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=guile-gnutls
pkgver=4.0.0
pkgrel=0
pkgdesc="Guile Scheme bindings for GnuTLS"
url="https://gitlab.com/gnutls/guile"
arch="all"
license="LGPL-2.1-or-later"
depends="guile"
makedepends="automake autoconf libtool gnutls-dev guile-dev texinfo"
subpackages="$pkgname-doc"
options="!strip" # see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907061
source="https://gitlab.com/gnutls/guile/-/archive/v$pkgver/guile-v$pkgver.tar
	tests-do-not-use-hostname-for-sni.patch"
builddir="$srcdir/guile-v$pkgver"

prepare() {
	default_prepare
	./bootstrap
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--disable-srp-authentication
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
f9258f13c48842241f79b27622ca3c66b67349765677256ce56f9861a49f00e4338df13964a5ddeee765a453f944aa0b52a5a4655da8e5a66e6128830b09a1e9  guile-v4.0.0.tar
f4e5aae91d589b7313ae3e8b31d295535dfb64349ba64c0809aa56f7b2f0b50447a359d7e816ad5c36449646e1ed91841c560e7cf36fe2ed8111160726da01d5  tests-do-not-use-hostname-for-sni.patch
"
